package com.project.common.service.impl;

import com.project.common.entity.SysRoleAuthorization;
import com.project.common.mapper.SysRoleAuthorizationMapper;
import com.project.common.service.SysRoleAuthorizationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Transactional
@Service
public class SysRoleAuthorizationImpl implements SysRoleAuthorizationService {
    @Autowired
    private SysRoleAuthorizationMapper sysRoleAuthorizationMapper;
    @Override
    public int deleteByRoleId(Integer roleId) {
        return sysRoleAuthorizationMapper.deleteByRoleId(roleId);
    }

    @Override
    public int insertSelective(SysRoleAuthorization record) {
        return sysRoleAuthorizationMapper.insertSelective(record);
    }

    @Override
    public int deleteByRoleIdAndAuId(Integer roleId, Integer auId) {
        return sysRoleAuthorizationMapper.deleteByRoleIdAndAuId(roleId,auId);
    }

    @Override
    public List<SysRoleAuthorization> selectByRoleIdAndAuId(Integer roleId, Integer auId) {
        return sysRoleAuthorizationMapper.selectByRoleIdAndAuId(roleId, auId);
    }
}
